// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_ACCOUNTS_PAYABLE_ITEM
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinAccountsPayableItemEntity : EntityBase
    {
        public FinAccountsPayableItemTable TableSchema
        {
            get
            {
                return FinAccountsPayableItemTable.Current;
            }
		}
		
		public FinAccountsPayableItemEntity()
        {

        }
		
		public FinAccountsPayableItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ItemId = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_ID"]));
			this.PayableOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PAYABLE_ORDER_ID"]));
			this.ImportItemId = Convert.ToString(CommonFunctions.ToObject(dr["IMPORT_ITEM_ID"]));
			this.InvoiceQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["INVOICE_QTY"]));
			this.InvoicePrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["INVOICE_PRICE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public FinAccountsPayableItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ItemId = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_ID"]));
			this.PayableOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PAYABLE_ORDER_ID"]));
			this.ImportItemId = Convert.ToString(CommonFunctions.ToObject(dr["IMPORT_ITEM_ID"]));
			this.InvoiceQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["INVOICE_QTY"]));
			this.InvoicePrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["INVOICE_PRICE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinAccountsPayableItemTable.Current;
            }
        }
		
		#region Perporty List
        public string ItemId
        {
            get { return Convert.ToString(GetData(FinAccountsPayableItemTable.C_ITEM_ID)); }
            set { SetData(FinAccountsPayableItemTable.C_ITEM_ID, value); }
        }
		
        public string PayableOrderId
        {
            get { return Convert.ToString(GetData(FinAccountsPayableItemTable.C_PAYABLE_ORDER_ID)); }
            set { SetData(FinAccountsPayableItemTable.C_PAYABLE_ORDER_ID, value); }
        }
		
        public string ImportItemId
        {
            get { return Convert.ToString(GetData(FinAccountsPayableItemTable.C_IMPORT_ITEM_ID)); }
            set { SetData(FinAccountsPayableItemTable.C_IMPORT_ITEM_ID, value); }
        }
		
        public decimal InvoiceQty
        {
            get { return Convert.ToDecimal(GetData(FinAccountsPayableItemTable.C_INVOICE_QTY)); }
            set { SetData(FinAccountsPayableItemTable.C_INVOICE_QTY, value); }
        }
		
        public decimal InvoicePrice
        {
            get { return Convert.ToDecimal(GetData(FinAccountsPayableItemTable.C_INVOICE_PRICE)); }
            set { SetData(FinAccountsPayableItemTable.C_INVOICE_PRICE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(FinAccountsPayableItemTable.C_REMARK)); }
            set { SetData(FinAccountsPayableItemTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

